/*
 * Home.java
 *
 * Created on January 29, 2007, 11:11 PM
 *
 * To change this template, choose Tools | Template Manager
 * and open the template in the editor.
 */
package ge.info.pages;

import ge.info.domain.StringString;
import ge.ktapestry.pages.BasePageExt;
import org.apache.tapestry.IRequestCycle;


import java.util.*;

public abstract class GeoInd extends BasePageExt
{

    public static int SERVICE_ID = 35;

    public abstract String getRegcoun();

    public abstract void setRegcoun(String s);

    public abstract String getInd();

    public abstract void setInd(String s);

    public abstract List<TreeMap> getGeoIndMessages();

    public abstract void setGeoIndMessages(List<TreeMap> list);

    public abstract TreeMap getMessage();

    public abstract void setMessage(TreeMap message);

    public abstract StringString getStringString();

    public abstract void setStringString(StringString stringString);

    public void search(IRequestCycle cycle)
    {

        StringString stringString = new StringString();
        stringString.setStringOne(getInd());
        stringString.setStringTwo(getRegcoun());

        this.setGeoIndMessages(getDbExecutor().getGeoIndMessages(stringString));

    }
     public void sendSMS(IRequestCycle cycle, TreeMap message)
    {


        StringBuilder sb = new StringBuilder();
        if (message!=null)
        {
      
        sb.append(message.get("REGNAME")).append(" ");
        sb.append(message.get("COUNNAME")).append(" ");
        sb.append(message.get("IND")).append(" ");
        }



        getDbExecutor().insertSms(getSession(), sb.toString(), SERVICE_ID);
    }
}
